module MobileDev
  module Client
    class DerivedData
      def delete(name = nil)
        path = if name
                 "#{ENV['HOME']}/Library/Developer/Xcode/DerivedData/#{name}"
               else
                 "#{ENV['HOME']}/Library/Developer/Xcode/DerivedData"
               end
        FileUtils.rm_rf(path)
      end
    end
  end
end